<div id="page">
<div class="page-title" style="z-index: 780;">
	<div class="in" style="z-index: 770;">
			<div class="titlebar" style="z-index: 760;">	<h2>Edit Website</h2> <p>Update website info</p></div>
			<div class="clear" style="z-index: 740;"></div>
	</div>
</div>

<div class="content" style="z-index: 730;">
<?php
if($error && !empty($error_msg)){
?>
<div class="albox errorbox" style="z-index: 670;">
	<ul>
<?php
	foreach($error_msg as $err){
		echo "<li>$err</li>";
	}
	echo '</ul><a class="close tips" href="#" original-title="close">close</a></div>';
}
elseif($msg != ''){
?>
<div class="albox succesbox" style="z-index: 690;">
	<b>Success :</b> <?php echo $msg; ?>. 
	<a class="close tips" href="#" original-title="close">close</a>
</div>
<?php
}
?>
<div class="simplebox grid740" style="z-index: 720;">
		<div class="titleh" style="z-index: 710;">
			<h3>Add website form</h3>
		</div>
		<div class="body" style="z-index: 690;">
		
		  <form action="" method="post" name="form2" id="form2">
		  
          	<div class="st-form-line" style="z-index: 640;">	<span class="st-labeltext">Status</span>	
			<div id="uniform-select1">
			<select id="select1" name="customer">
              <?php
				if(!empty($items)){
					foreach($items as $website){
						$selected = "";
						if ($website['customer_id'] == $itemid) $selected = "selected='selected'";
				?>
			  		<option value="<?php echo $website['customer_id'] ?>" <?php echo $selected; ?> ><?php echo $website['customer_name'] ?></option>
              <?php
					}
				}
				?>
			</select>
			</div>
				<div class="clear" style="z-index: 630;"></div> 
			</div>  
            
			<div class="st-form-line" style="z-index: 680;">	
				<span class="st-labeltext">website name</span>	
				<input type="text" style="width:300px" id="website_name" class="st-forminput" name="website_name" value="<?php echo $websiteInfo['website_name'] ?>"> 
			<div class="clear" style="z-index: 670;"></div>
			</div>
		  	
            <div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">URL_Link</span>	
				<input type="text" style="width:300px" id="url_link" class="st-forminput" name="url_link" value="<?php echo $websiteInfo['url_link'] ?>"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>
			
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">SMS code</span>	
				<input type="text" style="width:100px" id="sms_code" class="st-forminput" name="sms_code" original-title="SMS code for build app later" value="<?php echo $websiteInfo['sms_code'] ?>"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>            
			
			<!-- This is uniform selectbox - view this item class -->
			</div>
				<div class="clear" style="z-index: 630;"></div> 
			</div>
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">Website User</span>	
				<input type="text" style="width:200px" id="customer_user" class="st-forminput" name="website_user" original-title="Website User for login app later" disabled="disabled" value="<?php echo $websiteInfo['website_user'] ?>"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>
            
			<div class="st-form-line" style="z-index: 500;">	
				<span class="st-labeltext">Change password ?</span>
					
					<!-- start checkbox iphone style -->
						<p class="field switch" id="changepwd">
						<label class="cb-enable" id="pwdyes" for="radio1"><span>Yes</span></label>
						<label class="cb-disable selected" id="pwdno" for="radio2"><span>No</span></label>
						<input type="hidden" name="pwdflag" id="pwdflag" value="0">
						</p>
					<!-- end checkbox iphone style -->
					
				<div class="clear" style="z-index: 490;"></div> 
			</div>
									
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">Password</span>	
				<input type="password" style="width:300px" id="website_password" class="st-forminput" name="website_password" disabled="disabled"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>
		  
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">Re-type Password</span>	
				<input type="password" style="width:300px" id="website_password2" class="st-forminput" name="website_password2" disabled="disabled"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>

			<div class="button-box" style="z-index: 460;">
			  <input type="submit" class="st-button" value="Submit" id="button" name="button">
			  <input type="reset" class="st-clear" value="Reset" id="button2" name="button">
			</div>
			<script language="javascript" type="text/javascript">
			$("#changepwd").click(function(obj){
				if($("#pwdyes").attr("class") == 'cb-enable selected'){
					$("#pwdflag").val("1");
					$("#website_password").removeAttr("disabled");
					$("#website_password2").removeAttr("disabled");
					$("#website_password").focus();
				}
				else{
					$("#pwdflag").val("0");
					$("#website_password").val("");
					$("#website_password2").val("");
					$("#website_password").attr("disabled", "disabled");
					$("#website_password2").attr("disabled", "disabled");
				}
			});
			</script>

		  </form>
		  
		</div>
	</div>
</div>
</div>